function puzzleCryptor()
	{
		this.letterLookup = new Array();
		this.encryptedLetterLookup = new Array();				
		
		this.populateEncryptionArrays = function()
		{
		    this.letterLookup.push("a");
			this.letterLookup.push("b");
			this.letterLookup.push("c");
			this.letterLookup.push("d");
			this.letterLookup.push("e");
			this.letterLookup.push("f");
			this.letterLookup.push("g");
			this.letterLookup.push("h");
			this.letterLookup.push("i");
			this.letterLookup.push("j");
			this.letterLookup.push("k");
			this.letterLookup.push("l");
			this.letterLookup.push("m");
			this.letterLookup.push("n");
			this.letterLookup.push("o");
			this.letterLookup.push("p");
			this.letterLookup.push("q");
			this.letterLookup.push("r");
			this.letterLookup.push("s");
			this.letterLookup.push("t");
			this.letterLookup.push("u");
			this.letterLookup.push("v");
			this.letterLookup.push("w");
			this.letterLookup.push("x");
			this.letterLookup.push("y");
			this.letterLookup.push("z");
			this.letterLookup.push("-");
			this.letterLookup.push(".");
			this.letterLookup.push(" ");
			this.letterLookup.push(",");
			this.letterLookup.push("\'");
			this.letterLookup.push("!");
			this.letterLookup.push("?");
			this.encryptedLetterLookup.push("b");
			this.encryptedLetterLookup.push("c");
			this.encryptedLetterLookup.push("d");
			this.encryptedLetterLookup.push("e");
			this.encryptedLetterLookup.push("f");
			this.encryptedLetterLookup.push("g");
			this.encryptedLetterLookup.push("h");
			this.encryptedLetterLookup.push("i");
			this.encryptedLetterLookup.push("j");
			this.encryptedLetterLookup.push("k");
			this.encryptedLetterLookup.push("l");
			this.encryptedLetterLookup.push("m");
			this.encryptedLetterLookup.push("n");
			this.encryptedLetterLookup.push("o");
			this.encryptedLetterLookup.push("p");
			this.encryptedLetterLookup.push("q");
			this.encryptedLetterLookup.push("r");
			this.encryptedLetterLookup.push("s");
			this.encryptedLetterLookup.push("t");
			this.encryptedLetterLookup.push("u");
			this.encryptedLetterLookup.push("v");
			this.encryptedLetterLookup.push("w");
			this.encryptedLetterLookup.push("x");
			this.encryptedLetterLookup.push("y");
			this.encryptedLetterLookup.push("z");
			this.encryptedLetterLookup.push("-");
			this.encryptedLetterLookup.push(".");
			this.encryptedLetterLookup.push(" ");
			this.encryptedLetterLookup.push(",");
			this.encryptedLetterLookup.push("$");
			this.encryptedLetterLookup.push("!");
			this.encryptedLetterLookup.push("?");
			this.encryptedLetterLookup.push("a");
		}
		
		this.encryptPuzzle = function(puzzle)
		{
			if(this.encryptedLetterLookup.length == 0)
			{
				this.populateEncryptionArrays();
			}
			var retVal = "";
			for(var counter = 0; counter<puzzle.length; counter++)
			{
				var letter = puzzle.charAt(counter);
				var letterIndex = getCharacterIndex(letter.toLowerCase(), this.letterLookup);
				var encryptedLetter = this.encryptedLetterLookup[letterIndex];
				retVal = retVal + encryptedLetter;
			}
			return retVal;
		}
		
		this.decryptPuzzle = function(puzzle)
		{
			if(this.encryptedLetterLookup.length == 0)
			{
				this.populateEncryptionArrays();
			}
			var retVal = "";
			
			for(var counter = 0; counter<puzzle.length; counter++)
			{
			    var letter = puzzle.charAt(counter);
			    var letterIndex = getCharacterIndex(letter.toLowerCase(), this.encryptedLetterLookup);
				var decryptedLetter = this.letterLookup[letterIndex];
				retVal = retVal + decryptedLetter;
			}
			return retVal;
		}

		function getCharacterIndex(character, whichList) 
		{
		    for (var counter = 0; counter < whichList.length; counter++) {
		        if (character == whichList[counter]) {
		            return counter;
		        }
		    }
		    return -1;
		}
	}